home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 8 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.3 KB

  1. Path: cygnus.com!not-for-mail
  2. From: rfg@monkeys.com (Ronald F. Guilmette)
  3. Newsgroups: comp.std.unix,comp.std.c
  4. Subject: Buffering??  What buffering??
  5. Followup-To: comp.std.c
  6. Date: 1 Jan 1996 16:35:16 -0800
  7. Organization: Infinite Monkeys & Co.
  8. Sender: sef@cygnus.com
  9. Approved: sef@cygnus.com (Moderator, Sean Eric Fagan)
  10. Message-ID: <4c9uk4$sa4@cygnus.com>
  11. NNTP-Posting-Host: cygnus.com
  12. X-Submissions: std-unix@uunet.uu.net
  13.  
  14. Submitted-by: rfg@monkeys.com (Ronald F. Guilmette)
  15.  
  16. Greetings and happy new year.
  17.  
  18. I would like to know the exact semantics of the _IOFBF, _IOLBF, and
  19. _IONBF mode flags for the `setvbuf' function (subclause 7.9.5.6 of the
  20. ANSI/ISO C tandard).
  21.  
  22. Correct me if I'm wrong, but there doesn't seem to be any description
  23. whatsoever of the semantics of these flags in the C standard.  Given
  24. that, I rather wonder why these were standardized at all.  Certainly,
  25. to just say ``Here are some possible flags for this function.  We don't
  26. know what they do.'' doesn't help anybody.
  27.  
  28. What does the term ``full buffering'' mean?
  29.  
  30. What are the exact semantics of ``line buffering''?  In particular,
  31. what is supposed to happen if I attempt (say, using fprintf) to write
  32. a ``line'' to a given FILE where the length of the line exceeds the
  33. size of the buffer currently associated with the given FILE?
  34.  
  35. What are the semantics of ``no buffering''?  In particular, what are
  36. the implications for the traditional implementations of the getc and
  37. putc macros of setting _IONBF for a given file?  Given that traditional
  38. definitions of the getc and putc macros (including those which are still
  39. in widespread use today) _assume_ buffering, should these macro defini-
  40. tions be considered ``broken'' with respect to the ANSI/ISO C standard
  41. in the presence of a call to setvbuf which uses _IONBF?  (For all you
  42. POSIX 1003.1c aficionados out there note that this question also applies
  43. equally to the new getc_unlocked and putc_unlocked functions.  Are the
  44. current implementations of those ``broken'' too?)
  45.  
  46. -
  47. -- Ron Guilmette, Roseville, CA -------- Infinite Monkeys & Co. ------------
  48. ---- E-mail: rfg@monkeys.com ----------- Purveyors of Compiler Test Suites -
  49. ------ Copyright (c) 1995 by Ronald F. Guilmette; All rights reserved. -----
  50.  
  51. [ Note the crossposting and Followup-To: line -- mod ]
  52.  
  53. Volume-Number: Volume 35, Number 75
  54.